1027 Pomona, Albany, CA 94706 CompuServe: 70611,1215
If you like it, please send $10. Thanx.
ABOUT THIS BUTTON: It will read any TAB DELIMITED file into a new stack, allow you to name fields to hold the data, and do some crude layout of the form. It will provide a relatively complete HyperCard database that includes next, previous, and home buttons -- the rest is up to you.
You will be asked first for the name of the new stack. Next it will want to know what text file file to import - just select it. The script will then read the file, figure out how many fields are in it and ask for the name of each field. Each field name defaults to the data that is in that field in the first record of the file -- to help you remember what each field is, or if you have put the field names at the top, to make it easier.
LIMITATIONS: There are many: 1) As of now, it will only read tab delimited fields, though I am working on other formats (such as mailmerge, comma delimited, SYLK, etc.). 2) All the created fields are the same size on screen. This simplified the coding, and it shouldn't be too hard to go back and adjust them.
CHANGES: Aside from making it more flexible in types of files it can read, it could go faster by locking the screen, so every record doesn't have to get written. But I like to see what is going on. You can also customize this by placing the "import" button onto a background you like better -- it is self contained.
Clicking "cancel" in most dialogues will NOT stop the entire operation -- I haven't done all the error trapping yet. Typing command-period will stop it, though it will leave the source file open. Type "close file" followed by the file name into the message box to close the file. I have worked with files of up to 500 records, and it does take some time (about 10 minutes to read 200 or so records into a stack).